
package za.ac.cput.peterjohn.DesignPatternPrincipals.creational.singleton;

public class SingletonExample 
{
    private static SingletonExample singletonExample = null;

    public static SingletonExample getInstance() 
    {
        if(singletonExample == null)
            singletonExample = new SingletonExample();
        
        return singletonExample;
    }

    public String sayHello() { return "Hello world"; }   
}